'use strict';

/* Filters */
// need load the moment.js to use this filter. 
angular.module('app')
    .filter('fromNow', function() {
        return function(date) {
          return moment(date).fromNow();
        }
    })
    .filter('format', function() {
        return function(ele) {
            return moment(new Date(ele)).format("YYYY-MM-DD HH:mm:ss");
        }
    })
;